/*
 * ColorLaneSensorPoller.hpp
 *
 *  Created on: 11 jan. 2013
 *      Author: Admin
 */

#ifndef COLORLANESENSORPOLLER_HPP_
#define COLORLANESENSORPOLLER_HPP_

#include "ColorLaneSensor.hpp"
#include "LaneSensorStatus.hpp"

class LaneSensorPoller
{
public:
	static LaneSensorPoller& getInstance()
	{
		static LaneSensorPoller instance;
		return instance;
	}

	void pollLaneSensors();

	virtual ~LaneSensorPoller();

	LaneSensorStatus getColorLaneSensorStatus();
//	LaneSensorStatus getSideExitSensorStatus();

//	ColorLaneStatus getColorLaneStatus();
private:
	ColorLaneSensor* 	leftColorLaneSensor, * rightColorLaneSensor;/*,
						* leftSideExitSensor, * rightSideExitSensor;*/

//	ColorLaneStatus	colorLaneStatus, sideExitStatus;
	LaneSensorStatus colorLaneSensorStatus;//, sideExitSensorStatus;

	LaneSensorPoller();
//	void handlePoll(LaneSensorChange colorLaneSensorChange, LaneSensorChange sideExitSensorChange);
	void updateLaneSensorStatus();
	void updateSideExitStatus();
//	LaneSensorChange getChangeFrom(LaneSensorStatus oldStatus, bool leftSensor, bool rightSensor);
};

#endif /* COLORLANESENSORPOLLER_HPP_ */
